package com.day11.study.thread_demo;

class Type2Thread implements Runnable {

    @Override
    public void run() {
        while (true) {
            System.out.println(Thread.currentThread().getName());
        }
    }
}

public class Type2 {
    public static void main(String[] args) {
        Thread t = new Thread(new Type2Thread());
        t.start();
        while (true) {
            System.out.println(Thread.currentThread().getName());
        }
    }
}
